﻿@model IEnumerable<Gfw.Web.Models.Genealogy.UserRecommendMemberModel>
@{
    ViewBag.Title = "推荐会员名单列表";
    Layout = null;
}
@using C.Mvc
@using MvcContrib.UI.Grid;


@using (Ajax.BeginForm("RecommendMembersList", "UserGenealogy", null, Gfw.Web.Common.ViewHelper.AjaxGet))
{
@Html.Grid(Model).Columns(
            column =>
            {
                column.For(x => x.LoginName).Named("用户名");
                column.For(x => string.IsNullOrEmpty(x.Name) ? "无" : x.Name).Named("姓名");
                column.For(x => string.IsNullOrEmpty(x.Tel) ? "无" : x.Tel).Named("联系电话");
                column.For(x => string.IsNullOrEmpty(x.QQ) ? "无" : x.QQ).Named("QQ号");
                column.For(x => string.IsNullOrEmpty(x.ChildArea) ? "无" : x.ChildArea).Named("区域（相对于自己）");
                column.For(x => string.IsNullOrEmpty(x.RegistrationDate) ? "无" : x.RegistrationDate).Named("注册时间");
                column.Custom(@<text>
@*@Html.ActionLink("详情", "Details", new { userID = item.UserID })*@
    <a href="javascript:window.showModalDialog('Details?userID=@item.UserID&recommenderCode=@item.RecommenderCode',null,'dialogWidth=1000px;dialogHeight=700px;resizable=yes;');">详情</a>
</text>).Named("操作");
            }
    ).Attributes(id => "mytable", cellpadding => "0", cellspacing => "0").Empty("没有推荐会员")

    @Ajax.DataGridPager().Totals(ViewBag.TotalSize).PageIndex(ViewBag.PageIndex).PagePropertyName("page").Model(new { did = ViewBag.did }).AjaxOptions(Gfw.Web.Common.ViewHelper.AjaxGet);  
}